Optimal. Leaf size=202 \[ \frac {8 (9 A-19 B) \tan (c+d x)}{15 a^3 d}-\frac {(6 A-13 B) \tanh ^{-1}(\sin (c+d x))}{2 a^3 d}+\frac {4 (9 A-19 B) \tan (c+d x) \sec ^2(c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}-\frac {(6 A-13 B) \tan (c+d x) \sec (c+d x)}{2 a^3 d}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{5 d (a \sec (c+d x)+a)^3}+\frac {(6 A-11 B) \tan (c+d x) \sec ^3(c+d x)}{15 a d (a \sec (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.47, antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4019, 3787, 3767, 8, 3768, 3770} \[ \frac {8 (9 A-19 B) \tan (c+d x)}{15 a^3 d}-\frac {(6 A-13 B) \tanh ^{-1}(\sin (c+d x))}{2 a^3 d}+\frac {4 (9 A-19 B) \tan (c+d x) \sec ^2(c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}-\frac {(6 A-13 B) \tan (c+d x) \sec (c+d x)}{2 a^3 d}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{5 d (a \sec (c+d x)+a)^3}+\frac {(6 A-11 B) \tan (c+d x) \sec ^3(c+d x)}{15 a d (a \sec (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3768
Rule 3770
Rule 3787
Rule 4019
Rubi steps
\begin {align*} \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx &=\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {\int \frac {\sec ^4(c+d x) (4 a (A-B)-a (2 A-7 B) \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx}{5 a^2}\\ &=\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(6 A-11 B) \sec ^3(c+d x) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {\int \frac {\sec ^3(c+d x) \left (3 a^2 (6 A-11 B)-a^2 (18 A-43 B) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{15 a^4}\\ &=\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(6 A-11 B) \sec ^3(c+d x) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {4 (9 A-19 B) \sec ^2(c+d x) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {\int \sec ^2(c+d x) \left (8 a^3 (9 A-19 B)-15 a^3 (6 A-13 B) \sec (c+d x)\right ) \, dx}{15 a^6}\\ &=\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(6 A-11 B) \sec ^3(c+d x) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {4 (9 A-19 B) \sec ^2(c+d x) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {(8 (9 A-19 B)) \int \sec ^2(c+d x) \, dx}{15 a^3}-\frac {(6 A-13 B) \int \sec ^3(c+d x) \, dx}{a^3}\\ &=-\frac {(6 A-13 B) \sec (c+d x) \tan (c+d x)}{2 a^3 d}+\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(6 A-11 B) \sec ^3(c+d x) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {4 (9 A-19 B) \sec ^2(c+d x) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}-\frac {(6 A-13 B) \int \sec (c+d x) \, dx}{2 a^3}-\frac {(8 (9 A-19 B)) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{15 a^3 d}\\ &=-\frac {(6 A-13 B) \tanh ^{-1}(\sin (c+d x))}{2 a^3 d}+\frac {8 (9 A-19 B) \tan (c+d x)}{15 a^3 d}-\frac {(6 A-13 B) \sec (c+d x) \tan (c+d x)}{2 a^3 d}+\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(6 A-11 B) \sec ^3(c+d x) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {4 (9 A-19 B) \sec ^2(c+d x) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.40, size = 768, normalized size = 3.80 \[ \frac {\sec \left (\frac {c}{2}\right ) \sec (c) \cos \left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^4(c+d x) \left (-2094 A \sin \left (c-\frac {d x}{2}\right )+1314 A \sin \left (c+\frac {d x}{2}\right )-1650 A \sin \left (2 c+\frac {d x}{2}\right )-450 A \sin \left (c+\frac {3 d x}{2}\right )+1230 A \sin \left (2 c+\frac {3 d x}{2}\right )-1050 A \sin \left (3 c+\frac {3 d x}{2}\right )+1278 A \sin \left (c+\frac {5 d x}{2}\right )-90 A \sin \left (2 c+\frac {5 d x}{2}\right )+918 A \sin \left (3 c+\frac {5 d x}{2}\right )-450 A \sin \left (4 c+\frac {5 d x}{2}\right )+630 A \sin \left (2 c+\frac {7 d x}{2}\right )+60 A \sin \left (3 c+\frac {7 d x}{2}\right )+480 A \sin \left (4 c+\frac {7 d x}{2}\right )-90 A \sin \left (5 c+\frac {7 d x}{2}\right )+144 A \sin \left (3 c+\frac {9 d x}{2}\right )+30 A \sin \left (4 c+\frac {9 d x}{2}\right )+114 A \sin \left (5 c+\frac {9 d x}{2}\right )-870 A \sin \left (\frac {d x}{2}\right )+1830 A \sin \left (\frac {3 d x}{2}\right )+4329 B \sin \left (c-\frac {d x}{2}\right )-1989 B \sin \left (c+\frac {d x}{2}\right )+3575 B \sin \left (2 c+\frac {d x}{2}\right )+475 B \sin \left (c+\frac {3 d x}{2}\right )-2005 B \sin \left (2 c+\frac {3 d x}{2}\right )+2275 B \sin \left (3 c+\frac {3 d x}{2}\right )-2673 B \sin \left (c+\frac {5 d x}{2}\right )-105 B \sin \left (2 c+\frac {5 d x}{2}\right )-1593 B \sin \left (3 c+\frac {5 d x}{2}\right )+975 B \sin \left (4 c+\frac {5 d x}{2}\right )-1325 B \sin \left (2 c+\frac {7 d x}{2}\right )-255 B \sin \left (3 c+\frac {7 d x}{2}\right )-875 B \sin \left (4 c+\frac {7 d x}{2}\right )+195 B \sin \left (5 c+\frac {7 d x}{2}\right )-304 B \sin \left (3 c+\frac {9 d x}{2}\right )-90 B \sin \left (4 c+\frac {9 d x}{2}\right )-214 B \sin \left (5 c+\frac {9 d x}{2}\right )+1235 B \sin \left (\frac {d x}{2}\right )-3805 B \sin \left (\frac {3 d x}{2}\right )\right ) (A+B \sec (c+d x))}{480 d (a \sec (c+d x)+a)^3 (A \cos (c+d x)+B)}-\frac {4 (13 B-6 A) \cos ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^2(c+d x) (A+B \sec (c+d x)) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d (a \sec (c+d x)+a)^3 (A \cos (c+d x)+B)}+\frac {4 (13 B-6 A) \cos ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^2(c+d x) (A+B \sec (c+d x)) \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )+\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d (a \sec (c+d x)+a)^3 (A \cos (c+d x)+B)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 295, normalized size = 1.46 \[ -\frac {15 \, {\left ({\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{5} + 3 \, {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left ({\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{5} + 3 \, {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (6 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (16 \, {\left (9 \, A - 19 \, B\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (114 \, A - 239 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (234 \, A - 479 \, B\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (2 \, A - 3 \, B\right )} \cos \left (d x + c\right ) + 15 \, B\right )} \sin \left (d x + c\right )}{60 \, {\left (a^{3} d \cos \left (d x + c\right )^{5} + 3 \, a^{3} d \cos \left (d x + c\right )^{4} + 3 \, a^{3} d \cos \left (d x + c\right )^{3} + a^{3} d \cos \left (d x + c\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 233, normalized size = 1.15 \[ -\frac {\frac {30 \, {\left (6 \, A - 13 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac {30 \, {\left (6 \, A - 13 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} + \frac {60 \, {\left (2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 30 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 255 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 465 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.70, size = 334, normalized size = 1.65 \[ \frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d \,a^{3}}-\frac {B \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d \,a^{3}}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{2 d \,a^{3}}-\frac {2 B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d \,a^{3}}+\frac {17 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{3}}-\frac {31 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{3}}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) A}{d \,a^{3}}-\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) B}{2 d \,a^{3}}+\frac {7 B}{2 d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {A}{d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {B}{2 d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {7 B}{2 d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {A}{d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) A}{d \,a^{3}}+\frac {13 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) B}{2 d \,a^{3}}-\frac {B}{2 d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 377, normalized size = 1.87 \[ -\frac {B {\left (\frac {60 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {7 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{3} - \frac {2 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {465 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {40 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {390 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac {390 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}\right )} - 3 \, A {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} - \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}\right )}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.03, size = 216, normalized size = 1.07 \[ \frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A-B\right )}{2\,a^3}+\frac {3\,\left (3\,A-5\,B\right )}{4\,a^3}+\frac {2\,A-10\,B}{4\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,A-7\,B\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A-5\,B\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A-B}{4\,a^3}+\frac {3\,A-5\,B}{12\,a^3}\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A-B\right )}{20\,a^3\,d}-\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (6\,A-13\,B\right )}{a^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec ^{5}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{6}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________